package com.zsrt.devbase.common.utils;

/**
 * 常量类，用于定义常量
 *
 */
public final class ConstantDefine {
	private ConstantDefine() {
	}
	public static final String SYSTEM = "system";
	/**保存数据list的key*/
	public static final String ROWS = "rows";
	
	/**总记录数的key*/
	public static final String TOTAL="total";
	
	/**页码导航的key*/
	public static final String PAGINATION = "pagination";
	
	
	/**控制器返回错误信息的key*/
	public static final String SYS_ERROR_KEY="sysErrorMsg";
	
	
	/**控制器返回字段错误信息的key*/
	public static final String FIELD_ERR_MSG="fieldErrMsg";
	
	/**控制器返回业务校验提示信息的key*/
	public static final String CHECK_ERROR="checkError";
	
	/**可以重新住入的校验*/
	public static final String CHECK_OK_MSG="checkOkMsg";
	
	/**控制器返回正确提示信息的key*/
	public static final String SUCCESS_MSG="successMsg";
	public static final String SUCCESS="success";
	public static final String FAIL="fail";
	public static final String FAIL_MSG="fialMsg";
	/**操作成功*/
	public static final String SUCCESS_INFO="操作成功";
	/**操作失败*/
	public static final String FAIL_INFO="操作失败";
	public static final String NO_PERMISSION="拒绝访问！请先申请权限";
	
	/**系统错误*/
	public static final String SYS_ERR_MSG="系统繁忙，请稍后重试！";
	/**登录提示*/
	public static final String LOGIN_INFO="登录信息过期,请重新登录后再操作";
	
	/**token**/
	public static final String TOKEN="token";
	//填写错误信息与key end
	
	public static final String UTF8="UTF-8";
	
	public static final String RESULT="result";
	
	//填写请求路径常量 start
	/**转发到错误页面*/
	public static final String FORWARD_ERROR_VIEW = "forward:/error.jsp";
	/**重定向到错误页面*/
	public static final String REDIRECT_ERROR_VIEW = "redirect:/error.jsp";
	
	//填写请求路径常量 end
	/**验证码字段常量*/
	public static final String CODE="code";
	/**发送时间字段常量*/
	public static final String SEND_TIME="sendTime";
	
	/**用户账号session的key */
	public static final String PERSONCODE_SESSION = "personCodeSession";
	/**用户名session的key */
	public static final String PERSON_NAME_SESSION = "personNameSession";
	/**用户名session的key 角色类型 */
	public static final String PERSON_TYPE_SESSION = "personTypeSession";
	
	/**mysql utf8的 一个中文长度为1*/
	public static final int MYSQL_CHINESE_LEN=1; 
	/**yyyy-MM-dd*/
	public static final String YMD = "yyyy-MM-dd";
	public static final String YMD_HMS = "yyyy-MM-dd HH:mm:ss";
	/** yyyy-MM*/
	public static final String YM = "yyyy-MM";
	public static final String HMS="HH:mm:ss";
	//常用正则表达式
	
	public static final String CHINESE_REG = "^[\u4e00-\u9fa5]+$";
	/**密码包含大小写字母、数字6-18位正则表达式,必须包含两种*/
	public static final String PWD_REG = "^(?![A-Z]+$)(?![a-z]+$)(?!\\d+$)(?![\\W_]+$)\\S{6,20}$ ";
	
	/**判断手机号码的格式的正则表达式*/
	public static final String PHONE_NUM_REG = "^1[0-9]{10}$";
	
	
	public static final String PHONE_OR_TELEPHONE_REG = "^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$";
	/**判断邮箱的格式的正则表达式*/
	public static final String EMAIL_REG = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
			
	/**日期(yyyy-MM-dd)正则，满足润年、平年*/
	public static final String YMD_REG="^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$";
	/**判断网址链接格式是否正确*/
	

	// 请根据实际 appid 和 appkey 进行开发
	public static final int APPID = 1400026039;
	public static final String APPKEY = "5abc0ef5e47e2aff04713db306f80fb1";
	
	public static final String ROLE_SESSION = "roleSession";
	
	public static final String ACCOUNT_SESSION = "accountSession";
	
	public static final String PERSON_SESSION = "personSession";
	
	
}
